package fr.aprr.geoloc.server.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

import fr.aprr.geoloc.client.service.OdysseeService;
import fr.aprr.geoloc.server.dao.OdysseeDao;
import fr.aprr.geoloc.shared.domain.Odyssee;

@Service("odysseeService")
public class OdysseeServiceImpl extends RemoteServiceServlet implements
		OdysseeService {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Autowired
	private OdysseeDao odysseeDao;

	public Odyssee getOdyssee(Integer id) throws IllegalArgumentException {
		// TODO Auto-generated method stub
		return odysseeDao.getOdyssee(id);
	}

	public List<Odyssee> getAllOdyssee() throws IllegalArgumentException {
		// TODO Auto-generated method stub
		return odysseeDao.getAllOdyssee();
	}

	public String greetServer(String string) {
		// TODO Auto-generated method stub
		return null;
	}

	// DAO 
	
	public OdysseeDao getOdysseeDao() {
		return odysseeDao;
	}

	public void setOdysseeDao(OdysseeDao ongletDao) {
		this.odysseeDao = ongletDao;
	}

}
